<?php
namespace app\api\controller\v1;



/**
 * 验证接口
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/6
 * Time: 15:59
 */
class Common{
    public function __construct(){
        header("Access-Control-Allow-Origin: *"); // 允许任意域名发起的跨域请求
        header('Access-Control-Allow-Headers: X-Requested-With,X_Requested_With');
        header("Access-Control-Allow-Credentials: true");
        if(isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'OPTIONS'){
            exit();
        }
    }


}